#ifndef __OAL_STRING_H__
#define __OAL_STRING_H__

#include <oal_types.h>


OAL_DECL(char *) oal_strncpy(char *dest,const char *src,size_t len);

OAL_DECL(char *) oal_strim(char *s);


OAL_DECL(char *) oal_strdup(const char *s);

OAL_DECL(int) oal_strcmp(const char *s1,const char *s2);
OAL_DECL(int) oal_stricmp(const char *s1,const char *s2);
OAL_DECL(int) oal_strncmp(const char *s1,const char *s2,size_t len);
OAL_DECL(int) oal_strnicmp(const char *s1,const char *s2,size_t len);

//将ip转换成字符串(str长度至少为16)
OAL_DECL(char *) oal_iptoa(uint32_t ip,char *str);
OAL_DECL(uint32_t) oal_atoip(char *str);

/*
	char *str = "123.2332.222.222";
	oal_str_t ostr[12];
	oal_split(str,ostr,12);

*/
OAL_DECL(int) oal_split(char *str,char *strs[],size_t strs_len);


#endif
